package com.ssy.lingxi.marketing.api.model.request;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 领取优惠券请求类
 * @author yzc
 * @version 2.0.0
 * @date 2021/9/7
 */
@Data
public class GiftCouponRequest implements Serializable {


    private static final long serialVersionUID = -2874447223293130719L;
    /**
     * （买家）会员id
     */
    @NotNull(message = "（买家）会员id不能为空")
    private Long memberId;
    /**
     * （买家）角色id
     */
    @NotNull(message = "（买家）角色id不能为空")
    private Long roleId;
    /**
     * （买家）会员名称
     */
    @NotBlank(message = "（买家）会员名称不能为空")
    private String memberName;
    /**
     * 商城id
     */
    @NotNull(message = "商城id不能为空")
    private Long shopId;
    /**
     * 优惠券信息
     */
    @Valid
    @NotNull(message = "优惠券信息不能为空")
    @Size(min = 1,message = "优惠券信息不能为空")
    private List<GiftCouponItemRequest> couponList;

}
